package com.example.messagemodule.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.messagemodule.R;
import com.example.messagemodule.entity.ConversationMore;

import java.util.List;

public class ConversationMoreAdapter extends BaseQuickAdapter<ConversationMore, BaseViewHolder> {
    public ConversationMoreAdapter(int layoutResId, @Nullable List<ConversationMore> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ConversationMore item) {
        Glide.with(mContext).load(item.getIconString()).transform(new CenterCrop()).into((ImageView) helper.getView(R.id.conversation_item_icon));
        helper.setText(R.id.conversation_item_title,item.getTitle());
    }
}
